package com.dashang.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.dashang.dao.IUserDao;
import com.dashang.dao.SqlMapConstant;
import com.dashang.entity.UserInfo;

public class UserDaoImpl extends SqlMapClientDaoSupport implements IUserDao
{

    /**
     * 查询用户
     *
     * @param userInfo 用户信息
     * @return 用户信息
     */
    public UserInfo queryUser(UserInfo userInfo)
    {
        return (UserInfo)getSqlMapClientTemplate().queryForObject(SqlMapConstant.GET_USERFINO, userInfo);
    }

    /**
     *
     * 重载方法

     * @param userInfo
     * @return
     */
    public List<UserInfo> queryUserWithRF(UserInfo userInfo)
    {
        return getSqlMapClientTemplate().queryForList(SqlMapConstant.GET_USERFINO_WITH_RF, userInfo);
    }
}
